package com.yuf.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yuf.pojo.TbItem;
import com.yuf.service.ItemService;

@Controller
@RequestMapping("/item")
public class ItemController {
	
	@Resource
	private ItemService itemService;
	
	
	@RequestMapping(value="/getItem/{id}")
	@ResponseBody
	public TbItem getItem(@PathVariable Long id) {
		TbItem item = itemService.selectOneById(id);
		return item;
		
	}

}
